from pathlib import Path
from shutil import copy
from moviepy import VideoFileClip
src_dir = Path(r'D:\Downloads\video')
des_dir = Path(r'D:\Downloads\video\mp4')
if not des_dir.exists():
    des_dir.mkdir(parents=True)
for i in src_dir.glob('*'):
    if i.is_file():
        if i.suffix != '.mp4':
            clip = VideoFileClip(str(i))
            new_file=des_dir / (i.stem + '.mp4')
            clip.write_videofile(new_file)
        else:
            copy(i, des_dir)
